package com.typhoon.rpc.common.dto;

import java.io.Serializable;

/**
 * rpc请求传输类
 * 
 * @author typhoon
 *
 */
public class RpcRequest implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8926305622201560841L;
	
	/**
	 * 请求唯一标示
	 */
	private String requestId;
	
	 /**
     *接口名称 
     */
    private String interfaceName;
    
    
    /**
     * 方法名称
     */
    private String methodName;
    
    /**
     * 方法类型列表
     */
    private Class<?>[] parameterTypes;
    
    /**
     * 方法参数列表
     */
    private Object[] parameters;
    
    
    

	public RpcRequest() {
		super();
	}
	
	public static RpcRequest create(String requestId, String interfaceName, String methodName, Class<?>[] parameterTypes,
			Object[] parameters) {
		return new RpcRequest(requestId, interfaceName, methodName, parameterTypes, parameters);
	}
	

	private RpcRequest(String requestId, String interfaceName, String methodName, Class<?>[] parameterTypes,
			Object[] parameters) {
		super();
		this.requestId = requestId;
		this.interfaceName = interfaceName;
		this.methodName = methodName;
		this.parameterTypes = parameterTypes;
		this.parameters = parameters;
	}



	public String getRequestId() {
		return requestId;
	}

	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public String getInterfaceName() {
		return interfaceName;
	}

	public void setInterfaceName(String interfaceName) {
		this.interfaceName = interfaceName;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public Class<?>[] getParameterTypes() {
		return parameterTypes;
	}

	public void setParameterTypes(Class<?>[] parameterTypes) {
		this.parameterTypes = parameterTypes;
	}

	public Object[] getParameters() {
		return parameters;
	}

	public void setParameters(Object[] parameters) {
		this.parameters = parameters;
	}
    
    

}
